package UnitTest.DataStructureTest.treeTest.binaryTreeTest.binaryTreeImplTest;


import DataStructure.tree.binaryTree.binaryTreeImpl.Array2BinaryTreeImpl;
import DataStructure.tree.binaryTree.binaryTreeImpl.BinaryTreeImpl;
import UnitTest.DataStructureTest.treeTest.binaryTreeTest.binaryTreeTestData.BT_TestData_Tree;
import Top100.basicDS.Array2BinaryTree;
import org.junit.Test;

/**
 * @author liujun
 * @date 2020-02-18 16:42
 * @description 二叉树的实现 测试案例
 * 单序创建：
 * 1.1、将按层次遍历的方式输入的数组  构造成一个二叉树（特殊符号）【递归、非递归解法】
 * 特殊符号:
 * 2.1、将按先序遍历的方式输入的数组  构造成一个二叉树（特殊符号）【递归、非递归解法】
 * 2.2、将按中序遍历的方式输入的数组  构造成一个二叉树（特殊符号）【递归、非递归解法】
 * 2.3、将按后序遍历的方式输入的数组  构造成一个二叉树（特殊符号）【递归、非递归解法】
 * 完全二叉树:
 * 2.1、将一个完全二叉树的数组 构造成一个二叉树【递归、非递归解法】
 * 多序创建：
 * 4.1、已知前序遍历序列和中序遍历序列，构建唯一一棵确定的二叉树。【递归、非递归解法】
 * 4.2、已知后序遍历序列和中序遍历序列，构建唯一一棵确定的二叉树。【递归、非递归解法】
 */

public class Array2BinaryTreeImplTest extends BT_TestData_Tree {

    Array2BinaryTree instance = new Array2BinaryTreeImpl();

    //1.1、将按层次遍历的方式输入的数组  构造成一个二叉树（特殊符号）【递归、非递归解法】
    @Test
    public void TestCreateBTByLevelRecursive() {
        /*BinaryTreeImpl answer = instance.createBTByLevelRecursive(Array_BT_Full_Level_WithNLF_1);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_1());
        answer = instance.createBTByLevelRecursive(Array_BT_Full_Level_2_WithNLF);
        assert answer.equals(Tree_BT_Full_Level_2());
        answer = instance.createBTByLevelRecursive(Array_BT_Full_Level_3_WithNLF);
        assert answer.equals(Tree_BT_Full_Level_3());

        answer = instance.createBTByLevelRecursive(Array_BT_Level_WithNLF_2);
        assert answer.equals(Tree_BT_Level_WithNLF_2());
        answer = instance.createBTByLevelRecursive(Array_BT_Level_WithNLF_3);
        assert answer.equals(Tree_BT_Level_WithNLF_3());
        answer = instance.createBTByLevelRecursive(Array_BT_Level_WithNLF_4);
        assert answer.equals(Tree_BT_Level_WithNLF_4());
        answer = instance.createBTByLevelRecursive(Array_BT_Level_WithNLF_5);
        assert answer.equals(Tree_BT_Level_WithNLF_5());
        answer = instance.createBTByLevelRecursive(Array_BT_Level_WithNLF_6);
        assert answer.equals(Tree_BT_Level_WithNLF_6());
        answer = instance.createBTByLevelRecursive(Array_BT_Level_WithNLF_7);
        assert answer.equals(Tree_BT_Level_WithNLF_7());
        answer = instance.createBTByLevelRecursive(Array_BT_Level_WithNLF_8);
        assert answer.equals(Tree_BT_Level_WithNLF_8());*/
    }

    @Test
    public void TestCreateBTByLevelNonRecursive() {
        BinaryTreeImpl answer = instance.createBTByLevelNonRecursive(Array_BT_Full_Level_WithNLF_1);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_1());
        answer = instance.createBTByLevelNonRecursive(Array_BT_Full_Level_WithNLF_2);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_2());
        answer = instance.createBTByLevelNonRecursive(Array_BT_Full_Level_WithNLF_3);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_3());
        answer = instance.createBTByLevelNonRecursive(Array_BT_Full_Level_WithNLF_4);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_4());

        answer = instance.createBTByLevelNonRecursive(Array_BT_Level_WithNLF_2);
        assert answer.equals(Tree_BT_Level_WithNLF_2());
        answer = instance.createBTByLevelNonRecursive(Array_BT_Level_WithNLF_3);
        assert answer.equals(Tree_BT_Level_WithNLF_3());
        answer = instance.createBTByLevelNonRecursive(Array_BT_Level_WithNLF_4);
        assert answer.equals(Tree_BT_Level_WithNLF_4());
        answer = instance.createBTByLevelNonRecursive(Array_BT_Level_WithNLF_5);
        assert answer.equals(Tree_BT_Level_WithNLF_5());
        answer = instance.createBTByLevelNonRecursive(Array_BT_Level_WithNLF_6);
        assert answer.equals(Tree_BT_Level_WithNLF_6());
        answer = instance.createBTByLevelNonRecursive(Array_BT_Level_WithNLF_7);
        assert answer.equals(Tree_BT_Level_WithNLF_7());
        answer = instance.createBTByLevelNonRecursive(Array_BT_Level_WithNLF_8);
        assert answer.equals(Tree_BT_Level_WithNLF_8());
        answer = instance.createBTByLevelNonRecursive(Array_BT_Level_WithNLF_9);
        assert answer.equals(Tree_BT_Level_WithNLF_9());
    }

    //2.1、将按先序遍历的方式输入的数组  构造成一个二叉树（特殊符号）【递归、非递归解法】
    @Test
    public void TestCreateBTByPreOrderRecursive() {
        BinaryTreeImpl answer = instance.createBTByPreOrderRecursive(Array_BT_Full_Level_WithNLF_1_PreOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_1());
        answer = instance.createBTByPreOrderRecursive(Array_BT_Full_Level_WithNLF_2_PreOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_2());
        answer = instance.createBTByPreOrderRecursive(Array_BT_Full_Level_WithNLF_3_PreOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_3());
        answer = instance.createBTByPreOrderRecursive(Array_BT_Full_Level_WithNLF_4_PreOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_4());

        answer = instance.createBTByPreOrderRecursive(Array_BT_Level_WithNLF_2_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_2());
        answer = instance.createBTByPreOrderRecursive(Array_BT_Level_WithNLF_3_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_3());
        answer = instance.createBTByPreOrderRecursive(Array_BT_Level_WithNLF_4_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_4());
        answer = instance.createBTByPreOrderRecursive(Array_BT_Level_WithNLF_5_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_5());
        answer = instance.createBTByPreOrderRecursive(Array_BT_Level_WithNLF_6_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_6());
        answer = instance.createBTByPreOrderRecursive(Array_BT_Level_WithNLF_7_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_7());
        answer = instance.createBTByPreOrderRecursive(Array_BT_Level_WithNLF_8_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_8());
        answer = instance.createBTByPreOrderRecursive(Array_BT_Level_WithNLF_9_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_9());
    }

    @Test
    public void TestCreateBTByPreOrderNonRecursive() {
        /*BinaryTreeImpl answer = instance.createBTByPreOrderNonRecursive(Array_BT_Full_Level_WithNLF_1_PreOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_1());
        answer = instance.createBTByPreOrderNonRecursive(Array_BT_Full_Level_WithNLF_2_PreOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_2());
        answer = instance.createBTByPreOrderNonRecursive(Array_BT_Full_Level_WithNLF_3_PreOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_3());

        answer = instance.createBTByPreOrderNonRecursive(Array_BT_Level_WithNLF_2_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_2());
        answer = instance.createBTByPreOrderNonRecursive(Array_BT_Level_WithNLF_3_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_3());
        answer = instance.createBTByPreOrderNonRecursive(Array_BT_Level_WithNLF_4_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_4());
        answer = instance.createBTByPreOrderNonRecursive(Array_BT_Level_WithNLF_5_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_5());
        answer = instance.createBTByPreOrderNonRecursive(Array_BT_Level_WithNLF_6_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_6());
        answer = instance.createBTByPreOrderNonRecursive(Array_BT_Level_WithNLF_7_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_7());
        answer = instance.createBTByPreOrderNonRecursive(Array_BT_Level_WithNLF_8_PreOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_8());*/
    }

    //2.2、将按中序遍历的方式输入的数组  构造成一个二叉树（特殊符号）【递归、非递归解法】
    @Test
    public void TestCreateBTByInOrderRecursive() {
        /*BinaryTreeImpl answer = instance.createBTByInOrderRecursive(Array_BT_Full_Level_WithNLF_1_InOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_1());
        answer = instance.createBTByInOrderRecursive(Array_BT_Full_Level_WithNLF_2_InOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_2());
        answer = instance.createBTByInOrderRecursive(Array_BT_Full_Level_WithNLF_3_InOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_3());

        answer = instance.createBTByInOrderRecursive(Array_BT_Level_WithNLF_2_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_2());
        answer = instance.createBTByInOrderRecursive(Array_BT_Level_WithNLF_3_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_3());
        answer = instance.createBTByInOrderRecursive(Array_BT_Level_WithNLF_4_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_4());
        answer = instance.createBTByInOrderRecursive(Array_BT_Level_WithNLF_5_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_5());
        answer = instance.createBTByInOrderRecursive(Array_BT_Level_WithNLF_6_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_6());
        answer = instance.createBTByInOrderRecursive(Array_BT_Level_WithNLF_7_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_7());
        answer = instance.createBTByInOrderRecursive(Array_BT_Level_WithNLF_8_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_8());*/
    }

    @Test
    public void TestCreateBTByInOrderNonRecursive() {
        /*BinaryTreeImpl answer = instance.createBTByInOrderNonRecursive(Array_BT_Full_Level_WithNLF_1_InOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_1());
        answer = instance.createBTByInOrderNonRecursive(Array_BT_Full_Level_WithNLF_2_InOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_2());
        answer = instance.createBTByInOrderNonRecursive(Array_BT_Full_Level_WithNLF_3_InOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_3());

        answer = instance.createBTByInOrderNonRecursive(Array_BT_Level_WithNLF_2_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_2());
        answer = instance.createBTByInOrderNonRecursive(Array_BT_Level_WithNLF_3_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_3());
        answer = instance.createBTByInOrderNonRecursive(Array_BT_Level_WithNLF_4_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_4());
        answer = instance.createBTByInOrderNonRecursive(Array_BT_Level_WithNLF_5_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_5());
        answer = instance.createBTByInOrderNonRecursive(Array_BT_Level_WithNLF_6_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_6());
        answer = instance.createBTByInOrderNonRecursive(Array_BT_Level_WithNLF_7_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_7());
        answer = instance.createBTByInOrderNonRecursive(Array_BT_Level_WithNLF_8_InOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_8());*/
    }

    //2.3、将按后序遍历的方式输入的数组  构造成一个二叉树（特殊符号）【递归、非递归解法】
    @Test
    public void TestCreateBTByPostOrderRecursive() {
        BinaryTreeImpl answer = instance.createBTByPostOrderRecursive(Array_BT_Full_Level_WithNLF_1_PostOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_1());
        answer = instance.createBTByPostOrderRecursive(Array_BT_Full_Level_WithNLF_2_PostOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_2());
        answer = instance.createBTByPostOrderRecursive(Array_BT_Full_Level_WithNLF_3_PostOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_3());

        answer = instance.createBTByPostOrderRecursive(Array_BT_Level_WithNLF_2_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_2());
        answer = instance.createBTByPostOrderRecursive(Array_BT_Level_WithNLF_3_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_3());
        answer = instance.createBTByPostOrderRecursive(Array_BT_Level_WithNLF_4_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_4());
        answer = instance.createBTByPostOrderRecursive(Array_BT_Level_WithNLF_5_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_5());
        answer = instance.createBTByPostOrderRecursive(Array_BT_Level_WithNLF_6_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_6());
        answer = instance.createBTByPostOrderRecursive(Array_BT_Level_WithNLF_7_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_7());
        answer = instance.createBTByPostOrderRecursive(Array_BT_Level_WithNLF_8_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_8());
        answer = instance.createBTByPostOrderRecursive(Array_BT_Level_WithNLF_9_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_9());
    }

    @Test
    public void TestCreateBTByPostOrderNonRecursive() {
        /*BinaryTreeImpl answer = instance.createBTByPostOrderNonRecursive(Array_BT_Full_Level_WithNLF_1_PostOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_1());
        answer = instance.createBTByPostOrderNonRecursive(Array_BT_Full_Level_WithNLF_2_PostOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_2());
        answer = instance.createBTByPostOrderNonRecursive(Array_BT_Full_Level_WithNLF_3_PostOrder);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_3());

        answer = instance.createBTByPostOrderNonRecursive(Array_BT_Level_WithNLF_2_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_2());
        answer = instance.createBTByPostOrderNonRecursive(Array_BT_Level_WithNLF_3_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_3());
        answer = instance.createBTByPostOrderNonRecursive(Array_BT_Level_WithNLF_4_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_4());
        answer = instance.createBTByPostOrderNonRecursive(Array_BT_Level_WithNLF_5_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_5());
        answer = instance.createBTByPostOrderNonRecursive(Array_BT_Level_WithNLF_6_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_6());
        answer = instance.createBTByPostOrderNonRecursive(Array_BT_Level_WithNLF_7_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_7());
        answer = instance.createBTByPostOrderNonRecursive(Array_BT_Level_WithNLF_8_PostOrder);
        assert answer.equals(Tree_BT_Level_WithNLF_8());*/
    }

    //3.1、将一个完全二叉树的数组 构造成一个二叉树【递归、非递归解法】
    @Test
    public void TestCreateFullBTRecursive() {
        /*BinaryTreeImpl answer = instance.createFullBTRecursive(Array_BT_Full_Level_1);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_1());
        answer = instance.createBTByLevelNonRecursive(Array_BT_Full_Level_2);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_2());
        answer = instance.createBTByLevelNonRecursive(Array_BT_Full_Level_3);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_3());*/
    }

    @Test
    public void TestCreateFullBTNoRecursive() {
        BinaryTreeImpl answer = instance.createFullBTNonRecursive(Array_BT_Full_Level_1);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_1());
        answer = instance.createFullBTNonRecursive(Array_BT_Full_Level_2);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_2());
        answer = instance.createFullBTNonRecursive(Array_BT_Full_Level_3);
        assert answer.equals(Tree_BT_Full_Level_WithNLF_3());
    }

    //4.1、已知前序遍历序列和中序遍历序列，构建唯一一棵确定的二叉树。【递归、非递归解法】
    @Test
    public void TestCreateBTByPre_InOrderRecursive() {
        BinaryTreeImpl answer = instance.createBTByPre_InOrderRecursive(ReduceNLF(Array_BT_Full_Level_WithNLF_1_PreOrder), ReduceNLF(Array_BT_Full_Level_WithNLF_1_InOrder));
        assert answer.equals(Tree_BT_Full_Level_WithNLF_1());
        answer = instance.createBTByPre_InOrderRecursive(ReduceNLF(Array_BT_Full_Level_WithNLF_2_PreOrder), ReduceNLF(Array_BT_Full_Level_WithNLF_2_InOrder));
        assert answer.equals(Tree_BT_Full_Level_WithNLF_2());
        answer = instance.createBTByPre_InOrderRecursive(ReduceNLF(Array_BT_Full_Level_WithNLF_3_PreOrder), ReduceNLF(Array_BT_Full_Level_WithNLF_3_InOrder));
        assert answer.equals(Tree_BT_Full_Level_WithNLF_3());
        answer = instance.createBTByPre_InOrderRecursive(ReduceNLF(Array_BT_Full_Level_WithNLF_4_PreOrder), ReduceNLF(Array_BT_Full_Level_WithNLF_4_InOrder));
        assert answer.equals(Tree_BT_Full_Level_WithNLF_4());

        answer = instance.createBTByPre_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_2_PreOrder), ReduceNLF(Array_BT_Level_WithNLF_2_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_2());
        answer = instance.createBTByPre_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_3_PreOrder), ReduceNLF(Array_BT_Level_WithNLF_3_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_3());
        answer = instance.createBTByPre_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_4_PreOrder), ReduceNLF(Array_BT_Level_WithNLF_4_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_4());
        answer = instance.createBTByPre_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_5_PreOrder), ReduceNLF(Array_BT_Level_WithNLF_5_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_5());
        answer = instance.createBTByPre_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_6_PreOrder), ReduceNLF(Array_BT_Level_WithNLF_6_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_6());
        answer = instance.createBTByPre_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_7_PreOrder), ReduceNLF(Array_BT_Level_WithNLF_7_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_7());
        answer = instance.createBTByPre_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_8_PreOrder), ReduceNLF(Array_BT_Level_WithNLF_8_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_8());
        answer = instance.createBTByPre_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_9_PreOrder), ReduceNLF(Array_BT_Level_WithNLF_9_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_9());
    }

    @Test
    public void TestCreateBTByPre_InOrderNonRecursive() {
    }

    //4.2、已知后序遍历序列和中序遍历序列，构建唯一一棵确定的二叉树。【递归、非递归解法】
    @Test
    public void TestCreateBTPost_InOrderRecursive() {
        BinaryTreeImpl answer = instance.createBTByPost_InOrderRecursive(ReduceNLF(Array_BT_Full_Level_WithNLF_1_PostOrder), ReduceNLF(Array_BT_Full_Level_WithNLF_1_InOrder));
        assert answer.equals(Tree_BT_Full_Level_WithNLF_1());
        answer = instance.createBTByPost_InOrderRecursive(ReduceNLF(Array_BT_Full_Level_WithNLF_2_PostOrder), ReduceNLF(Array_BT_Full_Level_WithNLF_2_InOrder));
        assert answer.equals(Tree_BT_Full_Level_WithNLF_2());
        answer = instance.createBTByPost_InOrderRecursive(ReduceNLF(Array_BT_Full_Level_WithNLF_3_PostOrder), ReduceNLF(Array_BT_Full_Level_WithNLF_3_InOrder));
        assert answer.equals(Tree_BT_Full_Level_WithNLF_3());
        answer = instance.createBTByPost_InOrderRecursive(ReduceNLF(Array_BT_Full_Level_WithNLF_4_PostOrder), ReduceNLF(Array_BT_Full_Level_WithNLF_4_InOrder));
        assert answer.equals(Tree_BT_Full_Level_WithNLF_4());

        answer = instance.createBTByPost_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_2_PostOrder), ReduceNLF(Array_BT_Level_WithNLF_2_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_2());
        answer = instance.createBTByPost_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_3_PostOrder), ReduceNLF(Array_BT_Level_WithNLF_3_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_3());
        answer = instance.createBTByPost_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_4_PostOrder), ReduceNLF(Array_BT_Level_WithNLF_4_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_4());
        answer = instance.createBTByPost_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_5_PostOrder), ReduceNLF(Array_BT_Level_WithNLF_5_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_5());
        answer = instance.createBTByPost_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_6_PostOrder), ReduceNLF(Array_BT_Level_WithNLF_6_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_6());
        answer = instance.createBTByPost_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_7_PostOrder), ReduceNLF(Array_BT_Level_WithNLF_7_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_7());
        answer = instance.createBTByPost_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_8_PostOrder), ReduceNLF(Array_BT_Level_WithNLF_8_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_8());
        answer = instance.createBTByPost_InOrderRecursive(ReduceNLF(Array_BT_Level_WithNLF_9_PostOrder), ReduceNLF(Array_BT_Level_WithNLF_9_InOrder));
        assert answer.equals(Tree_BT_Level_WithNLF_9());
    }

    @Test
    public void TestCreateBTPost_InOrderNonRecursive() {
    }
}
